/**
     * @View
     * @class       : NewsList.js
     * @author : Mustapha FERHAN
     * @function    : News List
     */
//pref=new Preference();
  radio.views.NewsList = Ext
        .extend(
                Ext.Panel,
                {
                    
                   
                    layout:"fit",
                    dockedItems : [ {
                        xtype : 'toolbar',
                        title : "News",
                        items : [ {
                            xtype : 'button',
                            text : "Back",
                            ui : 'back',
                            handler : function() {
                                Ext.dispatch( {
                                    controller : 'home',
                                    action : 'index',
                                    historyUrl : 'home/index',
                                    animation : {
                                        type : 'slide',
                                        direction : 'right'
                                    }
                                });
                            }

                        }, {
                            xtype : 'spacer'
                        }

                        ]
                    } ],
                    items : [
                                {
                                    title : "News",
                                    xtype : 'list',
                                    id:'newsList',
                                    store:radio.stores.News,
                                    fullscreen: true,
                            		emptyText : 'No_data_available',
                                    itemTpl : new Ext.XTemplate(
                                    		//     '<tpl for=".">',
                                    		'<div style="padding:8px">',
                                    		'<div style="width:80px;height:60px; float:left; margin-right: 8px; background-repeat:no-repeat; background-position:50% 50%; background-size: 130%; background-image:url(\''+p.bph()+'{photo}\');"/>',
		'</div>',
                                    		'<span class:"sponsors-item-title">{title}</span>',
//                                    		'<p>{date}</p>', 
//                                    		'<p>{auteur}</p>',
                                    		'</div>'
                                ),
                             
         
                                 //   grouped : true,
                                    indexBar : true,
                                    listeners:{
                                        
                                	 itemTap:function(dataview,index,el,e){
                        	        record=dataview.store.getAt(index);
                                        Ext.dispatch({
                                            controller : 'news',
                                            action : 'show',
                                            historyUrl : 'show/show',
                                            id : record.getId(),
                                            record : record,
                                            animation : {
                                                type : 'slide',
                                                direction : 'left'
                                            }
                                            
                                        });

                                    }
                                }
                                   
                                }
                     ],
                    initComponent : function() {
                        radio.views.NewsList.superclass.initComponent.apply(
                                this, arguments);
                    }
                });
Ext.reg('NewsList', radio.views.NewsList);